import service from "@/utils/service.js"

function getpost(url, params) {
    return new Promise((resolve, reject) => {
        service.post(url, params)
            .then(response => {
                if (!response.data) {
                    resolve(response);
                }
                resolve(response.data);
            }, err => {
                reject(err);
            })
            .catch((err) => {
                reject(err)
            })
    })
}



export default getpost